﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.ComponentModel;

namespace Invini.Training
{
    public delegate void DeferredActionSyncEventHandler(DeferredActionSync sync);
    public class DeferredActionSync
    {
        public event DeferredActionSyncEventHandler Occured;
        public event DeferredActionSyncEventHandler ClearRequested;

        public bool OccuredIndicator
        {
            get;
            private set;
        }

        public void NotifyOccured()
        {
            this.OccuredIndicator = true;

            if (this.Occured != null)
                this.Occured(this);
        }
        public void Clear()
        {
            this.OccuredIndicator = false;
            if (this.ClearRequested != null)
                this.ClearRequested(this);
        }
    }
}
